#ifndef  CEF_TESTS_CEFCLIENT_BROWSER_OSS_UPLOAD_H_
#define CEF_TESTS_CEFCLIENT_BROWSER_OSS_UPLOAD_H_
#pragma once
#include "aos_util.h"
#include "aos_string.h"
#include "aos_status.h"
#include "oss_auth.h"
#include "oss_util.h"
#include "oss_api.h" 
#include <string>

class OSS_Upload // :public CefTask
{
public: 
	OSS_Upload(std::string  localpaperpath, std::string  paperid, int themetype, std::string  src);
	~OSS_Upload();
	void  UploadFile();
	bool UploadPreview();
	bool UploadUpup();
	bool UploadData();
	//void ListFile(const char *path, const char* delimeter);
	static void   percentage(int64_t consumed_bytes, int64_t total_bytes);
	//void Execute() override;
	static void init();
	static void release();
	static bool hasinit_;

private:
	void init_sample_request_options(oss_request_options_t *options, int is_cname);
	std::string  local_paper_path_;
	int themetype_;
	std::string mime_type;
	std::string paperid_;
	std::string  src_;
	apr_file_t *output_ = NULL;
	aos_pool_t *pool_ = NULL;

	//IMPLEMENT_REFCOUNTING(OSS_Upload);
};
#endif

